package com.gsoe.judge.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gsoe.po.Judge;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户刷题记录 Mapper 接口
 * </p>
 *
 * @author xiaoma
 * @since 2024-11-04
 */
public interface JudgeMapper extends BaseMapper<Judge> {

    @Select("select  distinct problem_id from judge.judge j where j.user_id =#{userId} and j.result=1 ")
    List<Judge> getSolveNumber(@Param("userId") Long userId);
}
